package colbert.content.myConstructor;

public class Student {
    // 实体类
    // 类内部自己的变量，称为成员变量
    private int age = 18;
    private String name = "colbert";
    public Student(){
        System.out.println("---------------打印构造器");
    }
    public Student(int age){
        System.out.println("---------------打印构造器age" + age);
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public void setAge(int age){
        this.age = age;
    }

    public int getAge() {
        return age;
    }
}
